package com.lxy.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
@Controller
@RequestMapping("/aaa")

public class Test01 {
    @RequestMapping("/hello")
    public ModelAndView helloWorld(){
        ModelAndView mv = new ModelAndView();
        mv.addObject("age",15);
        mv.setViewName("index");
        return mv;
    }

    @RequestMapping("/login")
    public String login(Model model,String userName,String pwd){
        model.addAttribute("userName",userName);
        model.addAttribute("pwd",pwd);
        return "lookLogin";
    }
}
